<?PHP
////////////////////////////////////////////////////////////////////////////
//                                                                        //
// NOTICE OF COPYRIGHT                                                    //
//                                                                        //
// Dean`s Office for Moodle                                               //
// Электронный деканат                                                    //
// <http://deansoffice.ru/>                                               //
//                                                                        //
// Copyright (C) 2008-2999  Alex Djachenko (Алексей Дьяченко)             //
// alex-pub@my-site.ru                                                    //
// Copyright (C) 2008-2999  Evgenij Cigancov (Евгений Цыганцов)           //
//                                                                        //
// This program is free software: you can redistribute it and/or modify   //
// it under the terms of the GNU General Public License as published by   //
// the Free Software Foundation, either version 3 of the Licensen.        //
//                                                                        //
// This program is distributed in the hope that it will be useful,        //
// but WITHOUT ANY WARRANTY; without even the implied warranty of         //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          //
// GNU General Public License for more details.                           //
//                                                                        //
// You should have received a copy of the GNU General Public License      //
// along with this program.  If not, see <http://www.gnu.org/licenses/>.  //
//                                                                        //
////////////////////////////////////////////////////////////////////////////

// Подключаем библиотеки
require_once('lib.php');

$export = optional_param('export', null, PARAM_TEXT);

if ( isset($export) )
{// запрос на выгрузку файла - осуществляем
    require_once ('../../sync/dnevnikru/excel/lib.php');
    $expoter = new dof_sync_dnevnikru_export_excel($DOF);
    $expoter->include_export_script($export);
}

//печать шапки страницы
$DOF->modlib('nvg')->print_header(NVG_MODE_PORTAL);

// вывод ссылок
echo "<a href=".$DOF->url_im("dnevnikru", "/index.php", array(
        'departmentid' => $addvars['departmentid'], 'export' => 'classes')).">"
        .$DOF->get_string("export_classes_title", "dnevnikru")."</a><br/>"; 

echo "<a href=".$DOF->url_im("dnevnikru", "/index.php", array(
        'departmentid' => $addvars['departmentid'], 'export' => 'persons')).">"
                .$DOF->get_string("export_persons_title", "dnevnikru")."</a><br/>";

echo "<a href=".$DOF->url_im("dnevnikru", "/index.php", array(
        'departmentid' => $addvars['departmentid'], 'export' => 'memberships')).">"
                .$DOF->get_string("export_memberships_title", "dnevnikru")."</a><br/>";

echo "<a href=".$DOF->url_im("dnevnikru", "/index.php", array(
        'departmentid' => $addvars['departmentid'], 'export' => 'all')).">"
        .$DOF->get_string("export_all_title", "dnevnikru")."</a><br/>";

$DOF->modlib('nvg')->print_footer(NVG_MODE_PORTAL);
?>